duplicate

abstract fun duplicate(block: DesignBlock, attachToParent: Boolean = true): DesignBlock

Duplicates a block including its children. Required scope: "lifecycle/duplicate" If the block is parented to a track that is set always-on-bottom, the duplicate is inserted in the same track immediately after the block. Otherwise, the duplicate is moved up in the hierarchy.

Return

the handle of the duplicate.

Parameters

block

the block to duplicate.

attachToParent

whether or not the new block will be attached to the same parent as the original.